﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace TimeQuest.Base
{
    public class Item
    {
        public string ItemName { get; set; }
        public int TextureID { get; set; }
        public Rectangle TextureRectangle { get; set; }

    }
    public class InventoryItemButton : XNAFormsLib.XNAButton
    {
        public InventoryItemButton(XNAFormsLib.Interfaces.IXNAGame owner)
            : base(owner)
        {
        }
        public Item Item { get; set; }
        public override void InvokePaint(SpriteBatch sb)
        {
            sb.Draw(ContentHandler.GetTexture(Item.TextureID),
                new Rectangle(Location.X, Location.Y, Item.TextureRectangle.Width, Item.TextureRectangle.Height),
                Item.TextureRectangle,
                Color.White);
        }
    }
    public class StaticPictureItem : GameObject
    {
        public StaticPictureItem()
        {
            BlocksPlayer = false;
        }
        public Rectangle MapImageRectangle { get; set; }

        public override Rectangle BaseRectangle
        {
            get
            {
                return new Rectangle(Location.X + (MapImageRectangle.Width / 2),
                    Location.Y + (MapImageRectangle.Height / 2),
                    0, 0);
            }
        }
        public override void Draw(SpriteBatch sb)
        {
            sb.Draw(ContentHandler.GetTexture(GameObjectTextureID),
                new Rectangle(Location.X, Location.Y, MapImageRectangle.Width, MapImageRectangle.Height),
                MapImageRectangle,
                Color.White);
        }
    }
}